﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<title>花间语 | 我的作品</title>
<link href="/static/index/css/css_whir.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/static/index/font/iconfont.css">
<link href="/static/index/css/user.css" rel="stylesheet" type="text/css" />
<link href="/static/index/css/toastr.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/static/index/js/jquery.min.js"></script>
<script type="text/javascript"  src="/static/index/js/nav.js"></script>
<script type="text/javascript" src="/static/index/js/jquery.SuperSlide.2.1.1.js"></script>
<script type="text/javascript" src="/static/index/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/static/index/js/toastr.min.js"></script>

<script type="text/javascript" src="/static/index/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/static/index/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/index/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/index/js/jquery.SuperSlide.2.1.1.js"></script>
<script type="text/javascript" src="/static/index/js/toastr.min.js"></script>

<style>
  .hmy_pic{width:1200px;
          height: 300px;
          margin:10px 0px;}
</style>
</head>
<body>
<!--头部-->
<div id="header">
  <div class="top_bg">
    <div class="logo"><a href="#"><img src="/static/index/imgs/logo.jpg" width="150" height="90" /></a></div>
    <div class="top">
      <!--导航-->
      <!-- {block name="header"} -->
      <div class="guide">
        <div class="welcom">Welcome to fantasy_dream !　</div>
        <div class="login">

            {empty name="session"}
            <a href="{:url('index/Login/index')}">登录</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="{:url('index/Register/index')}">注册</a>
            {else /}

            {empty name="session.name"}

            <a href="{:url('index/User/index')}" title="进入{$session.tel}主页"> | 您好,{$Request.session.hmy_user.tel}</a>

            {else /}

            <a href="{:url('index/User/index')}" title="进入{$session.name}主页"> 您好,{$Request.session.hmy_user.name}</a>

            {/empty}

             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{:url('index/Login/outlogin')}">注销</a>

             {/empty}
        </div>
        <!-- <div class="shopcart">购物车（<a href="会员中心.html">0</a>）</div> -->
        <div class="searchbox">
          <input type="text" value="" name="" class="input" />
          <input type="image" src="/static/index/imgs/sbtn.jpg"  class="btn"/>
        </div>
      </div>
      <!-- {/block} -->
      <!--菜单导航-->
      <div class="nav">
        <ul id="navul" class="cl">
          <li><a href="{:url('index/index/index')}">首页</a></li>
          {volist name="category" id="v"}
          <li class="navmenu"><a href="{:url('index/Index/lists',['id'=>$v['id']])}">{$v['name']}</a>
          </li>
          {/volist}
        </ul>
    <script type="text/javascript">

             $(document).ready(function(){
            //  $('.hyinfo li ').hover(function(){$(this).find('.subbox').stop(true,true).slideToggle(); });
              $('.navmenu').mouseenter(function(){

            $(this).find('.subnav').css("display","block");//you can give it a speed

              });
              $('.navmenu').mouseleave(function(){
            $(this).find('.subnav').css("display","none");

              //jQuery(this).css("background-image", "none");

              });

            });

        </script>
      </div>
    </div>
  </div>
</div>

{block name="main"}
<!--中间内容-->
<div class="hymain">
  <div class="position">您当前的位置：<em>图片详情</em></div>


    <div class="hmy_pic">
      <div class="pic_left" style="float: left;">
        <img src="http://pn5tyoo5a.bkt.clouddn.com/{$user.src}" alt="" height="300" style="margin-left: 200px;"/>
      </div>
      <div class="pic_right" style="float: left;margin-left: 50px;width:200px;height:300px">

        <div><h3>图片名:<font color="green">{$user.title}</font>({$cate.name})</h3></div>
        <hr />

        <div><h3 style="float:left">上传时间:{$user.upload_time}</h3></div>
        <br />

        <div style="margin-top: 10px;">
          <br />
          <h3>简介:
            {empty name="user.abstruct"}
            <font color="red">无</font>
            {else/}
            {$user.abstruct}
            {/empty}
          </h3>
        </div>

        <h3 style="margin-top: 90px"><a href="javascript:;" id="showModel1">修改信息</a></h3>

      </div>
    </div>

    {empty name="comment"}
    <div class="comment" style="width:1040px;margin-bottom: 10px;height: 50px;line-height: 50px;text-align: center">
      暂无评论
    </div>
    {else /}
      {volist name="comment" id="v"}
      <div class="comment" style="width:1040px;margin-bottom: 10px;">
        <div class="centent">

          <div class="comment-left" style="width:143px">
            <img src="http://pn5tyoo5a.bkt.clouddn.com/{$v.icon}" alt="" width="70" height="70">
            <div class="img-bttom" style="width:42px">{$v.name}</div>

          </div>
          <div class="comment-right">
            <div class="centent-top">评价:{$v['content']} <span style="float:right">{$v['commenttime']}</span></div>

            <div class="centent-bottom">作者回复:{$v['reply']}
              <button class="btn1" id="showModel" style="float:right;width:50px;height:20px;line-height: 20px;font-size:14px;">回复</button>

              <div id="modal" class="modal">
                  <div class="modal-content">
                    <header class="modal-header">
                      <h4>回复内容</h4>
                      <span class="close">×</span>
                    </header>
                    <div class="modal-body">
                      <!-- <form action="{:url('index/Index/reply')}"> -->
                      <form id="comment_reply">
                        <table>
                          <label for="" style="margin-top: 20px;">
                            <td>回复内容:</td>
                          </label>
                          <label for="">
                            <tr>
                              <td>
                                <input type="hidden" name="pid" value="{$v['pid']}">
                                <input type="hidden" name="id" value="{$v['id']}">
                                <textarea name="reply" id="" cols="80" rows="10" style="margin-left: 50px"></textarea>
                              </td>
                            </tr>
                          </label>
                        </table>
                    </div>
                      <footer class="modal-footer">
                        <div id="cancel" class="cancel" style="line-height: 26px">取消</div>
                        <div id="cancel" class="cancel" style="line-height: 26px" onclick="reply()">提交</div>
                      </footer>
                      </form>
                  </div>
                </div>

        <div id="modal1" class="modal">
          <div class="modal-content" style="height:400px">
            <header class="modal-header">
              <h4>修改信息</h4>
              <span class="close1">×</span>
            </header>
            <div class="modal-body">
              <form id="Hmy_upload">
                <table>
                    <tr height="10"></tr>
                    <tr>
                      <td>文件分类</td>
                      <td>
                        <select name="cid" id="" class="catefile">
                            {volist name="res" id="v"}
                            <option value="{$v['id']}">{$v['name']}</option>
                            {/volist}
                        </select>
                      </td>
                    </tr>
                    <tr height="10"></tr>
                    <tr>
                    <td>文件名</td>
                      <td><input type="text" name="title" class="namefile" value="{$user.title}"/><input type="hidden" name="id" class="namefile" value="{$user.id}"/></td>
                    </tr>
                    <tr height="10"></tr>
                    <tr>
                    <td>文件简述:</td>
                      <td><textarea name="abstruct" id="" cols="70" rows="10" value="{$user.abstruct}"></textarea></td>
                    </tr>

                </table>
            </div>
              <footer class="modal-footer">
                <div id="cancel1" class="cancel" style="line-height: 21px">取消</div>
                <div id="cancel1" class="cancel" style="line-height: 21px" onclick="Hmy_upload()">提交</div>
              </footer>
              </form>
          </div>
        </div>

        <script>

          // 评论回复
          var btn = document.getElementById('showModel');
          var close = document.getElementsByClassName('close')[0];
          var cancel = document.getElementById('cancel');
          var modal = document.getElementById('modal');

          btn.addEventListener('click', function(){
              modal.style.display = "block";
          });

          close.addEventListener('click', function(){
              modal.style.display = "none";
          });

          cancel.addEventListener('click', function(){
              modal.style.display = "none";
          });



            // 评论
            function reply(){
              var data = $('#comment_reply').serialize();
              console.log(data);

                $.ajax({
                    url:'/comment_reply',
                    Type:'get',
                    data:data,
                    dataType:'json',
                    success:function(data){

                      if (data.status) {

                          toastr.success(data.msg);
                          window.location.reload();

                      } else {

                          toastr.error(data.msg);

                      }

                    },
                    error:function(data){

                        toastr.error('系统故障,请联系管理员');

                    }
                });


            }
        </script>
        <script>
          function outLogin(session){
                // var session = $('#session').attr('session');

                $.ajax({
                    url:"/Hmy_outLogin",
                    Type:'get',
                    data:session,
                    dataType:'json',
                    success:function(data){

                          if (data.status) {
                              toastr.success(data.msg);
                              window.location.reload();
                          } else {
                              toastr.error(data.msg);
                          }
                    },
                    error:function(data){
                        toastr.error('系统故障,请联系管理员');
                    }
                });


            }
        </script>
         <!-- 修改信息 -->
        <script>
            var btn1 = document.getElementById('showModel1');
            var close1 = document.getElementsByClassName('close1')[0];
            var cancel1 = document.getElementById('cancel1');
            var modal1 = document.getElementById('modal1');

            btn1.addEventListener('click', function(){
                modal1.style.display = "block";
            });


            close1.addEventListener('click', function(){
                modal1.style.display = "none";
            });

            cancel1.addEventListener('click', function(){
                modal1.style.display = "none";
            });



          // 评论
            function Hmy_upload(){
              var data = $('#Hmy_upload').serialize();
              console.log(data);

                $.ajax({
                    url:'/pic_details',
                    Type:'get',
                    data:data,
                    dataType:'json',
                    success:function(data){

                      if (data.status) {

                          toastr.success(data.msg);
                          window.location.reload();

                      } else {

                          toastr.error(data.msg);

                      }

                    },
                    error:function(data){

                        toastr.error('系统故障,请联系管理员');

                    }
                });


            }
        </script>
      </div>
            </div>

          </div>

        </div>
      </div>
      {/volist}
    {/empty}


</div>
{/block}
<!--底部-->

<script type="text/javascript">
$(document).ready(function(){

  $("#leftsead a").hover(function(){
    if($(this).prop("className")=="youhui"){
      $(this).children("img.hides").show();
    }else{
      $(this).children("img.hides").show();
      $(this).children("img.shows").hide();
      $(this).children("img.hides").animate({marginLeft:'0px'},'slow');
    }
  },function(){
    if($(this).prop("className")=="youhui"){
      $(this).children("img.hides").hide('slow');
    }else{
      $(this).children("img.hides").animate({marginLeft:'-143px'},'slow',function(){$(this).hide();$(this).next("img.shows").show();});
    }
  });

  $("#top_btn").click(function(){if(scroll=="off") return;$("html,body").animate({scrollTop: 0}, 600);});

});
</script>

</body>
</html>
